import request from '@/utils/request'

// 查询订单列表
export function listOrder(query) {
  return request({
    url: '/vip/order/page',
    method: 'post',
    data: query
  })
}

// 查询订单详细
export function getOrder(id) {
  return request({
    url: '/vip/order/' + id,
    method: 'get'
  })
}

// 新增订单
export function addOrder(data) {
  return request({
    url: '/vip/order',
    method: 'post',
    data: data
  })
}

// 修改订单
export function updateOrder(data) {
  return request({
    url: '/vip/order',
    method: 'put',
    data: data
  })
}

// 删除订单
export function delOrder(id) {
  return request({
    url: '/vip/order/' + id,
    method: 'delete'
  })
}


// 定价
export function pricing(data) {
  const order = {
    id: data.id,
    price: data.price
  }
  return request({
    url: '/vip/order/pricing',
    method: 'post',
    data: order
  })
}


    /**通知验证码*/
export function sendCode(data){
      return request({
        url: '/vip/order/sendCode/'+data,
        method: 'get'
      })
}
    /**确认付款*/
export function confirmThePayment(data){
  return request({
    url: '/vip/order/confirmThePayment/'+data,
    method: 'get'
  })
}
    /**确认发货*/
export function deliverGoods(data){
  return request({
    url: '/vip/order/deliverGoods/'+data,
    method: 'get'
  })
}
